#!/usr/bin/env bash
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/config"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_BASE_PATH/common/functions"
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"

service-list-cmd() {
  #E list all services
  #E dokku $PLUGIN_COMMAND_PREFIX:list
  declare desc="list all $PLUGIN_SERVICE services"
  local cmd="$PLUGIN_COMMAND_PREFIX:list" argv=("$@")
  [[ ${argv[0]} == "$cmd" ]] && shift 1

  service_list
}

service-list-cmd "$@"
